package com.iaiai.browser.core.util;

import android.content.Context;
import android.view.animation.Animation;
import android.view.animation.TranslateAnimation;

/**
 * 
 * <p>
 * Title: AnimationUtil.java
 * </p>
 * <p>
 * E-Mail: 176291935@qq.com
 * </p>
 * <p>
 * QQ: 176291935
 * </p>
 * <p>
 * Http: iaiai.iteye.com
 * </p>
 * <p>
 * Create time: 2011-9-17
 * </p>
 * 
 * @author 丸子
 * @version 0.0.1
 */
public class AnimationUtil {

	/**
	 * 打开联系人下边的搜索条
	 * 
	 * @param context
	 * @return
	 */
	public static Animation getContactSearchOpen(Context context) {
		Animation animation = new TranslateAnimation(0f, 0f, Utils.dipTopx(
				context, 100), 0f);
		animation.setDuration(500l);
		return animation;
	}

	/**
	 * 关闭联系人下边的搜索条
	 * 
	 * @param context
	 * @return
	 */
	public static Animation getContactSearchClose(Context context) {
		Animation animation = new TranslateAnimation(0f, 0f, 0f, Utils.dipTopx(
				context, 100));
		animation.setDuration(500l);
		return animation;
	}

}
